import Http from './http'
import { getToken } from '../library/cookieUtil'

export function upload(data: any) {//未使用
  return Http.post(
    '/upload/upload',
    data,
    { "Content-Type": "multipart/form-data" },
  )
}
const token = getToken();

export const uploadConfig = {
  uploadUser: { SaveDir: "User", Type: "img" },
  uploadImages: { SaveDir: "Images", Type: "img" },
  uploadFiles: { SaveDir: "Files", Type: "attment" },
  uploadNotice: { SaveDir: "Notice", Type: "img" },
  uploadHeaders: { Authorization: "Bearer " + token },
  uploadUrl: Http.uploadURL(),
  hostURL: Http.hostURL()
}
